$(document).ready(function(){
	$("#addCommentButton").click(function(){
		$.post("pitch/addComment",{
			commentText:$("#addCommentTextInput").val(),
			pitchId:$("#pitchIdInput").val()
		}, function(data){
			if(data.success){
				window.location.href="pitch?pitchId=" + $("#pitchIdInput").val();
			}else{
				alert(data.errorMessage);
			}
		}, "json");
	});
});